<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="__CONTROL_TPL__/css/cart.css" />
	<title>后盾网学员项目-仿哇塞网</title>
</head>
<body>
<!-- 头部共用 -->
<include file="__TPL__/Common/head"/>
<include file="__TPL__/Common/alertlogin"/>
<script type="text/javascript" src='__CONTROL_TPL__/js/cart.js'></script>
<!-- 用于ajax发送的地址 -->
<script type="text/javascript">
	var dec_num_url=APP+'&c=Order&ajax_dec_num';//减少购买数量
	var add_num_url=APP+'&c=Order&ajax_add_num';//增加购买数量
</script>
<!-- 头部共用结束 -->
<div id="order" class="fixed">
	<div class="cartStatus">
		<img src="__CONTROL_TPL__/images/cart_status.jpg" alt="订单状态" />
	</div>
	<div class="clear"></div>
	<div class="cartNum">
		<span onclick="showCartStatus();" style="cursor: pointer;" class="color3B" >购物车状态</span>
		（<b ectype="cart_status" class="allNum">
		<if value="isset({$hd.session.cart.total_rows})">{$hd.session.cart.total_rows}<else/>0</if></b><b>/99</b>）
	</div>
	<div class="clear"></div>
	<form action="" id="cartForm" name="">
		<div class="cartCount">
			<ul>
				<li class="goon_shopping">
					<a target="_blank" href="{|U:'Index/index'}">继续购物</a>
				</li>
			</ul>
			<p class="totalPrice">宝贝总价<span class="subTotal weight">￥<span class="subTotal weight alltotal"><if value="isset({$hd.session.cart.total})">{$hd.session.cart.total}<else/>0</if></span></span></p>
			<P class="settlement">
				<if value="isset($hd.session.uid) && isset($hd.session.username)">
				 	<if value="isset($hd.session.cart)">
						<a name="jiesuan" href="{|U:'order'}"><img src="__CONTROL_TPL__/images/settlement_bg.jpg" alt="结算" /></a>
					<else/>
						<a name="jiesuan" href="javascript:"><img src="__CONTROL_TPL__/images/settlement_bg.jpg" alt="结算" /></a>
					</if>
				<else/>
					<a name="login" href="javascript:" onclick="popWin('alertlogin')"><img src="__CONTROL_TPL__/images/settlement_bg.jpg" alt="结算" /></a>
				</if>
			</P>
		</div>
		<ul class="cartTitle">
			<li class="all_check_but">
				<input type="checkbox" title="全选" checked="checked" class="xuanze check_all">
			</li>
			<li class="all_check">全选</li>
			<li class="store_baby">店铺宝贝</li>
			<li class="unit_price">单价</li>
			<li class="cart_googs_num">数量</li>
			<li class="cart_youhui">优惠</li>
			<li class="little_count">小计（元）</li>
			<li class="poeration">操作</li>
		</ul>
		
		<if value="isset({$hd.session.cart.goods})">
			<foreach from="{$hd.session.cart.goods}" value="$value" key="$key">
				<div class="cartList">
					<div class="cartListTitle">
						<span class="cartListTitleCheckbox">
							<input type="checkbox" value="{$key}" name="$session_keys[]" checked="checked" class="xuanze check_one">
						</span>
						<span class="cartListTitleCate">
							当前分类：<a target="_blank" href="" class="color3B">{$value.cate}</a>
						</span>
						<span class="cartListTitleAddress">{$value.place}</span>
					</div>
					<div class="cartListCon">
						<span class="cartListConCheckbox">
						</span>
						<dl>
							<dt><img src="{$value.imgUrl}" alt="图片占位" style="width:75px;height:75px;"/></dt>
							<dd>
								<p><a target="_blank" href="" class="color3B">{$value.name}</a></p>
								<p>颜色:{$value.options.color} 尺码:{$value.options.size}</p>
							</dd>
						</dl>
						<span class="cartListConUnitprice">{$value.price}</span>
						<ul class="input_numbox">
						<if value="{$value.num} neq 0">
							<li class="jianBtn"><img alt="decrease" src="__CONTROL_TPL__/images/cart_reduction.jpg"></li>
							<li class="numBox"><input sid="{$key}" class="ct" type="text" value="{$value.num}"></li>
							<li class="jiaBtn"><img alt="increase" src="__CONTROL_TPL__/images/cart_plus.jpg"></li>
							<input type="hidden" value='{$value.kucun}' name="kucun"/>
						<else/>
						 	<li>此商品库存不足</li>
						</if>
						</ul>
						<span class="buygoods_list_con_youhuiinfo_else">
							<p>--</p>
						</span>
						<span id="" class="buygoods_list_con_littlecount">{$value.total}</span>
						<span class="buygoods_list_con_poeration">
							<a href="javascript:" onclick="if(confirm('确定要删除吗？')) hd_ajax('{|U:'Order/del_one_cart', array('session_key' =>$key)}')">删除</a>
						</span>
					</div>
				</div>
			</foreach>
		<else/>
			<p style="color:#000;font-size:16px;text-align:center;margin-top:20px;">您的购物车还是空的,赶紧行动吧!</p>
			<p style="text-align:center;margin-top:15px;"><a href="{|U:'Category/top_list'}" style="color:#A75C18;font-size:16px;text-decoration:underline;">马上选购</a></p>
		</if>
		<dl class="administration_cart_goods">
			<dt>
				<p class="administration">
					<a href="javascript:" onclick="if(confirm('确定要删除吗？')) hd_ajax('{|U:'Order/del_some_cart'}',$('.cartList input:checked'))">批量删除</a>
				</p>
				<p class="administration_babycount">
					宝贝总价
					<em>￥</em><em class="subtotal size16 alltotal"><if value="isset({$hd.session.cart.total})">{$hd.session.cart.total}<else/>0</if></em>
				</p>
			</dt>
			<dd style="cursor: pointer;">
				<if value="isset($hd.session.uid) && isset($hd.session.username)">
					<if value="isset($hd.session.cart)">
						<a name="jiesuan" href="{|U:'order'}"><img title="结算" src="__CONTROL_TPL__/images/settlement.jpg"></a>
					<else/>
						<a name="jiesuan" href="javascript:"><img title="结算" src="__CONTROL_TPL__/images/settlement.jpg"></a>
					</if>
				<else/>
					<a name="login" href="javascript:" onclick="popWin('alertlogin')"><img title="登陆" src="__CONTROL_TPL__/images/settlement.jpg"></a>
				</if>
			</dd>
		</dl>
	</form>
</div>

<!-- 页脚共用 -->
<include file="__TPL__/Common/footer"/>
</body>
</html>